//
//  PublicDefine.h
//  hellomui
//
//  Created by zhangtao on 15/9/29.
//  Copyright © 2015年 zt.td. All rights reserved.
//

#ifndef PublicDefine_h
#define PublicDefine_h


#define  KEY_TEST                       0
//请求URL地址
#define S_SERVER  @"http://182.92.117.144:8080/study-manager"    
//@"http://www.fenghuang.org/study-manager"

#define MAIN_WIDTH [UIScreen mainScreen].bounds.size.width

#define MAIN_HEIGHT [UIScreen mainScreen].bounds.size.height

#define RGB(r, g, b, a) [UIColor colorWithRed:(double)r/255 green:(double)g/255 blue:(double)b/255 alpha:a]
#define VIEWCO [UIColor colorWithRed:240/255.0f green:240/255.0f blue:240/255.0f alpha:1]
#define rgb_box [[UIColor colorWithRed:230/255.0f green:230/255.0f blue:230/255.0f alpha:1]CGColor]


#define UIColorFromRGB(rgbValue)    [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define  HEIGHT_NAVIGATION             44
#define  HEIGHT_STATUSBAR              20
#define  MAX_HEIGHT                    64

#define  SCREEN_EQUAL_480              (MAIN_HEIGHT == 480 ? YES :NO )

#define kAlphaNum  @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"

//单例声明的公用函数
#define SINGLETON_FOR_HEADER(className) \
+ (className *)sharedInstance;

//单例实现的公用方法
#define SINGLETON_FOR_CLASS(className) \
+ (className *)sharedInstance { \
static className *shared = nil; \
static dispatch_once_t once_Token; \
dispatch_once(&once_Token, ^{ \
shared = [[self alloc] init]; \
}); \
return shared; \
}


#define MD5 [ToolObjc md5:dics]


#define KEY_REMOTEID                   @"KEY_REMOTEID"


#define SHARE_TEXT @"作业100，应用分享"

#define NSUSER(def) NSUserDefaults *def=[NSUserDefaults standardUserDefaults]
#define NSUSER_DEF_SET(a,b) [[NSUserDefaults standardUserDefaults] setValue:[dic valueForKey:a] forKey:b]
//#define NSUSER_DEF_NOR_SET(a,b)
#define NSUSER_DEF_NORSET(a,b) [[NSUserDefaults standardUserDefaults]setValue:a forKey:b]
#define NSUSER_DEF(a)  [[NSUserDefaults standardUserDefaults] valueForKey:a]

#define UIALERT(a,b,c,d)  UIAlertView *alert = [[UIAlertView alloc]initWithTitle:a message:b delegate:c cancelButtonTitle:d otherButtonTitles:@"确定" , nil];\
[alert show]




#define TencentAppid  @"1104792233"

#define PreDefM_APPID @"222222"



//微信
#define Scope @"snsapi_message,snsapi_userinfo,snsapi_friend,snsapi_contact"
#define AppID @"wxe9cc0ba1c71948dc" // @"wx9eed10cb757794e5"
#define AppSecret @"f743071c7522da0fa4fd33af1c5e3e48" //@"5e08a012d8fb0e7b5d4ca5fad14ca7d0"
#define Openid   @"wxe9cc0ba1c71948dc";// @"0c806938e2413ce73eef92cc3"

#define  HOME_PAGE_WEB @"http://182.92.117.144:8080/study-manager/homePage"
#define YES_LOGIN_WEB @"http://182.92.117.144:8080/study-manager/secondClass/sessionStorage?userId="

#endif /* PublicDefine_h */


